<template>
	<view class="content">
		<view class="cards">
			<view class="card" v-for="(item ,index) in list" :key="index">
				<image class="card_img" :src="item.thumb" mode="" @click="todatails(item.id)"></image>
				<view class="title">
					<text class="texts">{{item.name}}</text>
				</view>
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		methods: {
			todatails(id) {
				uni.navigateTo({
					url:"/pages/work/workdetails?id="+id
				})
			},
			show() {
				var then = this
				this.$http.post("/system/getConstructionList", {
					"page": 1,
					"limit": 10
				}).then(res => {
					console.log(res)
					then.list = res.data.data.list
				})
			}
		},
		onLoad() {
			this.show()
		}
	}
</script>

<style lang="scss" scoped>
	* {
		margin: 0 auto;
		padding: 0;

	}

	page {
		background-color: #f5f5f5;
	}


	.content {
		width: 100%;
		height: 100%;

		.cards {
			width: 90%;
			margin-top: 28rpx;
			padding-bottom: 52px;
			margin-left: 18px;

			.card {
				width: 100%;
				height: 500rpx;
				background-color: #ffffff;
				margin-bottom: 20rpx;
				border-radius: 20rpx;

				.card_img {
					width: 100%;
					height: 85%;
					border-radius: 20rpx 20rpx 0 0;

				}

				.title {
					width: 100%;
					height: 75rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					font-weight: 700;

				}

				.texts {
					margin-bottom: 20rpx;

				}
			}
		}
	}
</style>
